var express = require('express');
var router = express.Router();
var { ProductModel, UserModel } = require('../model/module')

router.post('/list', async function (req, res) {
  let list = await ProductModel.find()
  res.send({
    code: 200,
    data: list
  })
})







/* GET home page. */
router.get('/', function (req, res, next) {
  res.render('index', { title: 'Express' });
});

module.exports = router;
